<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>libCZI: libCZI::IAttachmentRepository Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(initResizable);
/* @license-end */</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
</script><script type="text/javascript" async src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">libCZI
   </div>
   <div id="projectbrief">Reading CZI documents made easy</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('classlib_c_z_i_1_1_i_attachment_repository.html','');});
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classlib_c_z_i_1_1_i_attachment_repository-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">libCZI::IAttachmentRepository Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div>  </div>
</div><!--header-->
<div class="contents">

<p>Interface for the attachment repository. This interface is used to access the attachments in a CZI-file.  
 <a href="classlib_c_z_i_1_1_i_attachment_repository.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="lib_c_z_i_8h_source.html">libCZI.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for libCZI::IAttachmentRepository:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classlib_c_z_i_1_1_i_attachment_repository.png" usemap="#libCZI::IAttachmentRepository_map" alt=""/>
  <map id="libCZI::IAttachmentRepository_map" name="libCZI::IAttachmentRepository_map">
<area href="classlib_c_z_i_1_1_i_c_z_i_reader.html" title="This interface is used to represent the CZI-file. " alt="libCZI::ICZIReader" shape="rect" coords="0,56,177,80"/>
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a38f1c13a03e2dd8887d911be2c1b892b"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlib_c_z_i_1_1_i_attachment_repository.html#a38f1c13a03e2dd8887d911be2c1b892b">EnumerateAttachments</a> (std::function&lt; bool(int index, const <a class="el" href="structlib_c_z_i_1_1_attachment_info.html">AttachmentInfo</a> &amp;info)&gt; funcEnum)=0</td></tr>
<tr class="separator:a38f1c13a03e2dd8887d911be2c1b892b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acc6b932d8d587bb8399c0236c1c29a55"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlib_c_z_i_1_1_i_attachment_repository.html#acc6b932d8d587bb8399c0236c1c29a55">EnumerateSubset</a> (const char *contentFileType, const char *name, std::function&lt; bool(int index, const <a class="el" href="structlib_c_z_i_1_1_attachment_info.html">AttachmentInfo</a> &amp;infi)&gt; funcEnum)=0</td></tr>
<tr class="separator:acc6b932d8d587bb8399c0236c1c29a55"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8f0a7a926425e39017559a95207e2d5d"><td class="memItemLeft" align="right" valign="top">virtual std::shared_ptr&lt; <a class="el" href="classlib_c_z_i_1_1_i_attachment.html">IAttachment</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlib_c_z_i_1_1_i_attachment_repository.html#a8f0a7a926425e39017559a95207e2d5d">ReadAttachment</a> (int index)=0</td></tr>
<tr class="separator:a8f0a7a926425e39017559a95207e2d5d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Interface for the attachment repository. This interface is used to access the attachments in a CZI-file. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="a38f1c13a03e2dd8887d911be2c1b892b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a38f1c13a03e2dd8887d911be2c1b892b">&#9670;&nbsp;</a></span>EnumerateAttachments()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void libCZI::IAttachmentRepository::EnumerateAttachments </td>
          <td>(</td>
          <td class="paramtype">std::function&lt; bool(int index, const <a class="el" href="structlib_c_z_i_1_1_attachment_info.html">AttachmentInfo</a> &amp;info)&gt;&#160;</td>
          <td class="paramname"><em>funcEnum</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Enumerate all attachments.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">funcEnum</td><td>The functor which will be called for every attachment. If the return value of the functor is true, the enumeration is continued, otherwise it is stopped. The first argument is the index of the attachment and the second is providing information about the attachment. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="acc6b932d8d587bb8399c0236c1c29a55"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acc6b932d8d587bb8399c0236c1c29a55">&#9670;&nbsp;</a></span>EnumerateSubset()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void libCZI::IAttachmentRepository::EnumerateSubset </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>contentFileType</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::function&lt; bool(int index, const <a class="el" href="structlib_c_z_i_1_1_attachment_info.html">AttachmentInfo</a> &amp;infi)&gt;&#160;</td>
          <td class="paramname"><em>funcEnum</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Enumerate the subset of the attachments defined by the parameters. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">contentFileType</td><td>If non-null, only attachments with this contentFileType will be considered. </td></tr>
    <tr><td class="paramname">name</td><td>If non-null, only attachments with this name will be considered. </td></tr>
    <tr><td class="paramname">funcEnum</td><td>The functor which will be called for every attachment (within the subset). If the return value of the functor is true, the enumeration is continued, otherwise it is stopped. The first argument is the index of the attachment and the second is providing information about the attachment. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a8f0a7a926425e39017559a95207e2d5d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8f0a7a926425e39017559a95207e2d5d">&#9670;&nbsp;</a></span>ReadAttachment()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual std::shared_ptr&lt;<a class="el" href="classlib_c_z_i_1_1_i_attachment.html">IAttachment</a>&gt; libCZI::IAttachmentRepository::ReadAttachment </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>index</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Reads the attachment identified by the specified index. If there is no attachment present (for the specified index) then an empty shared_ptr is returned. If a different kind of problem occurs (e. g. I/O error or corrupted data) an exception is thrown. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">index</td><td>Index of the attachment (as reported by the Enumerate-methods). </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>If successful, the attachment object; otherwise an empty shared_ptr. </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>libCZI/<a class="el" href="lib_c_z_i_8h_source.html">libCZI.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="namespacelib_c_z_i.html">libCZI</a></li><li class="navelem"><a class="el" href="classlib_c_z_i_1_1_i_attachment_repository.html">IAttachmentRepository</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.14 </li>
  </ul>
</div>
</body>
</html>
